package com.stone.inventory.core.app.algorithm;

import com.stone.inventory.core.domain.entity.StockLevel;
import com.stone.inventory.sharding.config.properties.DbShardingProperty;
import com.stone.inventory.sharding.helper.ShardingHelper;
import com.stone.inventory.sharding.infra.algorithm.AbstractShardingByPosCodeAlgorithm;

/**
 * 通过posCode进行库存分片算法
 *
 * @author Mr_wenpan@163.com 2021/8/17 10:56 上午
 */
public class StockLevelShardingByPosCodeAlgorithm extends AbstractShardingByPosCodeAlgorithm {

    public StockLevelShardingByPosCodeAlgorithm(DbShardingProperty dbShardingProperty) {
        super(dbShardingProperty);
    }

    @Override
    public String logicTableName() {
        return ShardingHelper.getEntityLogicTable(StockLevel.class);
    }
}